<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s"  uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<title>管理员登录</title>
<STYLE type=text/css>
BODY {
	FONT-SIZE: 12px;
	COLOR: #ffffff;
	FONT-FAMILY: 宋体
}

TD {
	FONT-SIZE: 12px;
	COLOR: #ffffff;
	FONT-FAMILY: 宋体
}
ul,ol,li {
	list-style: none
}
.errorMessage{
	color:red;
	font-weight: bold;
}
</STYLE>

<META content="MSHTML 6.00.6000.16809" name=GENERATOR>
<script type="text/javascript">
	function checkSubmit(){
		 var username = document.getElementById("username").value;
		 var password = document.getElementById("password").value;
		 var user_msg = document.getElementById("username_msg");
		 var pwd_msg = document.getElementById("password_msg");
		 var vali_code = document.getElementById("validateCode").value;
		 if(username==""){
				user_msg.innerHTML="用户名不能为空!";
				user_msg.style.color="red";
				return;
			 }else{
				 user_msg.innerHTML="";
				 user_msg.style.color="white";
			}
		if(password=="")	{
			pwd_msg.innerHTML="密码不能为空!";
			pwd_msg.style.color="red";
			return;
		}else{
			 pwd_msg.innerHTML="";
			 pwd_msg.style.color="white";
		}
		if(vali_code==""){
				alert("您还没有输入验证码!");
				return;
		 }
		 document.getElementById("form1").submit();
	}
</script>
</HEAD>
<BODY>
<FORM id="form1" name=form1 action="<%=request.getContextPath() %>/admin/login.htm" method=post>
<DIV></DIV>
<script type="text/javascript">
  function changeImage(_obj){
	  	var path='<%=request.getContextPath()%>';
		var random = Math.random(1000);
		_obj.src=path+"/AuthImage?radom="+random;
	  }
</script>
<DIV id=UpdatePanel1>
<DIV id=div1 style="LEFT: 0px; POSITION: absolute; TOP: 0px; BACKGROUND-COLOR: #0066ff"></DIV>
<DIV id=div2 style="LEFT: 0px; POSITION: absolute; TOP: 0px; BACKGROUND-COLOR: #0066ff"></DIV>
<SCRIPT language=JavaScript> 
var speed=20;
var temp=new Array(); 
var clipright=document.body.clientWidth/2,clipleft=0 ;
for (i=1;i<=2;i++){ 
	temp[i]=eval("document.all.div"+i+".style");
	temp[i].width=document.body.clientWidth/2;
	temp[i].height=document.body.clientHeight;
	temp[i].left=(i-1)*parseInt(temp[i].width);
} 
function openit(){ 
	clipright-=speed;
	temp[1].clip="rect(0 "+clipright+" auto 0)";
	clipleft+=speed;
	temp[2].clip="rect(0 auto auto "+clipleft+")";
	if (clipright<=0)
		clearInterval(tim);
} 
tim=setInterval("openit()",100);
                </SCRIPT>

<DIV>&nbsp;&nbsp;</DIV>
<DIV>
<TABLE cellSpacing=0 cellPadding=0 width=900 align=center border=0>
	<TBODY>
		<TR>
			<TD style="HEIGHT: 105px"><IMG src="<%=request.getContextPath() %>/images/login_1.gif" border=0></TD>
		</TR>
		<TR>
			<TD background="<%=request.getContextPath() %>/images/login_2.jpg" height=300>
			<TABLE height=300 cellPadding=0 width=900 border=0>
				<TBODY>
					<TR>
						<TD colSpan=2 height=35></TD>
					</TR>
					<TR>
						<TD width=360></TD>
						<TD>
						<TABLE cellSpacing=0 cellPadding=2 border=0>
							<TBODY>
								<TR>
									<TD style="HEIGHT: 28px" width=80>登 录 名：</TD>
									<TD style="HEIGHT: 28px" width=150><INPUT id="username" style="WIDTH: 130px" name="username"></TD>
									<TD style="HEIGHT: 28px" width=370><SPAN id="username_msg" style="FONT-WEIGHT: bold; COLOR: white"><s:fielderror fieldName="username"/></SPAN></TD>
								</TR>
								<TR>
									<TD style="HEIGHT: 28px">登录密码：</TD>
									<TD style="HEIGHT: 28px"><INPUT id="password" style="WIDTH: 130px" type=password name="password"></TD>
									<TD style="HEIGHT: 28px"><SPAN id="password_msg" style="FONT-WEIGHT: bold; COLOR: white"><s:fielderror fieldName="password"/></SPAN></TD>
								</TR>
								<TR>
									<TD style="HEIGHT: 28px">验证码：</TD>
									<TD style="HEIGHT: 28px" colspan="2"><INPUT id="validateCode" style="WIDTH: 75px" name="validateCode"><img src="<%=request.getContextPath() %>/AuthImage" onclick="changeImage(this)" alt="看不清楚？点击换一张" style="margin:-4px 3px;"/><s:fielderror fieldName="validateCode"/></TD>
								</TR>
								<TR>
									<TD style="HEIGHT: 18px"></TD>
									<TD style="HEIGHT: 18px"></TD>
									<TD style="HEIGHT: 18px"></TD>
								</TR>
								<TR>
									<TD></TD>
									<TD><INPUT id=btn style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px;background:transparent url(<%=request.getContextPath() %>/images/login_button.gif) no-repeat scroll center;width:119px;height:38px;" onclick='checkSubmit();' type="button"  name=btn ></TD>
								</TR>
							</TBODY>
						</TABLE>
						</TD>
					</TR>
				</TBODY>
			</TABLE>
			</TD>
		</TR>
		<TR>
			<TD><IMG src="<%=request.getContextPath() %>/images/login_3.jpg" border=0></TD>
		</TR>
	</TBODY>
</TABLE>
</DIV>
</DIV>
<DIV></DIV>
</FORM>
</BODY>
</HTML>
